package com.polytech.diploma.SQLGenerator.Oracle.Statements;

import java.util.List;
import java.util.Map;


public class SetStatement implements Subquery {

	protected Table leftTable = null;
	protected Table rightTable = null;
	
	protected SetStatementType type;
	
	public SetStatement(Table leftTable, Table rightTable, SetStatementType type) {
		super();
		
		this.leftTable = leftTable;
		this.rightTable = rightTable;
		this.type = type;
	}

	@Override
	public Map<String, List<String>> getTablesWithFields(
			Map<String, List<String>> fieldMap) {
		
		if(leftTable != null)
			fieldMap = leftTable.getTablesWithFields(fieldMap);
		if(rightTable != null)
			fieldMap = rightTable.getTablesWithFields(fieldMap);
		
		return fieldMap;
	}
	
}
